﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Admin.Master" Inherits="System.Web.Mvc.ViewPage<TBlog.Models.ViewData.PostPageModel>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server"></asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2 id="H1">เขียนหน้า</h2>

    <% using (Html.BeginForm()) {%>
        <%: Html.ValidationSummary(true) %>

        <fieldset>
            <legend></legend>            
            
            <p>
            <%: Html.LabelFor(model => model.post.post_title) %><br />
            <%: Html.TextBoxFor(model => model.post.post_title, new { width=380 }) %>            
            </p>
            
            <p>
            <%: Html.LabelFor(model => model.post.post_content) %><br />
            <%: Html.TextAreaFor(model => model.post.post_content, 20, 20, new { })%>            
            </p>

            <p>
            <%: Html.LabelFor(model => model.category) %>
            <%: Html.DropDownList("post_category_id", new SelectList(Model.category,"category_id","category_name"))%>
            </p>

            <p>
            <%: Html.Label("aaa") %>
            <% //: Html.DropDownListFor("", new SelectList(Model.)); %>
            </p>
           
            <p>
                <input type="submit" value="Create" />
            </p>
        </fieldset>

    <% } %>

    <div>
        <%: Html.ActionLink("Back to List", "Index") %>
    </div>

</asp:Content>
